<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  
 </head>
 <body>
  <script>
//字符串排序
var arr = new Array();
arr[0] = "George";
arr[1] = "John";
arr[2] = "Thomas";
arr[3] = "James";
arr[4] = "Adrew";
arr[5] = "Martin";
document.write('排序前:'+ arr + "<br />");
document.write('排序后:'+arr.sort());

  </script>
 </body>
</html>
